package com.yw.smartcityforjava.activity;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import android.os.Bundle;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.yw.smartcityforjava.App;
import com.yw.smartcityforjava.R;

public class UserInfoActivity extends AppCompatActivity {

    private Toolbar toolbar;
    private TextView titleTv;
    private ImageView headIv;
    private EditText nikeNameEt;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_user_info);

        toolbar = (Toolbar) findViewById(R.id.toolbar);
        titleTv = (TextView) findViewById(R.id.titleTv);
        headIv = (ImageView) findViewById(R.id.headIv);
        nikeNameEt = (EditText) findViewById(R.id.nikeNameEt);
        EditText phoneEt = (EditText) findViewById(R.id.phoneEt);

        titleTv.setText("个人信息");
        nikeNameEt.setText(App.userInfo.getUserName());
        phoneEt.setText(App.userInfo.getPhonenumber());
        Glide.with(this).load(App.baseUrl + App.userInfo.getAvatar()).circleCrop().into(headIv);

    }
}